package com.qd.pay.domain;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Size;
import java.time.LocalDateTime;


/**
 * @author sjk
 */
@Data
@Accessors(chain = true)
public class WxBillsDTO {

    private String bid;

    private LocalDateTime paytime;

    @Size(max = 32, message = "mchid长度不能超过{max}位")
    private String mchid;

    @Size(max = 32, message = "childmchid长度不能超过{max}位")
    private String childmchid;

    @Size(max = 32, message = "deviceid长度不能超过{max}位")
    private String deviceid;

    @Size(max = 50, message = "wxorderid长度不能超过{max}位")
    private String wxorderid;

    @Size(max = 50, message = "orderid长度不能超过{max}位")
    private String orderid;

    @Size(max = 50, message = "openid长度不能超过{max}位")
    private String openid;

    @Size(max = 16, message = "tradeType长度不能超过{max}位")
    private String tradeType;

    @Size(max = 16, message = "resultCode长度不能超过{max}位")
    private String resultCode;

    @Size(max = 16, message = "bankType长度不能超过{max}位")
    private String bankType;

    @Size(max = 16, message = "feeType长度不能超过{max}位")
    private String feeType;

    private Double totalFee;

    private Double enterprisebonusamount;

    @Size(max = 50, message = "tWxOrderid长度不能超过{max}位")
    private String tWxOrderid;

    @Size(max = 50, message = "tOrderid长度不能超过{max}位")
    private String tOrderid;

    private Double tTotalFee;

    private Double tEnterpriseAmount;

    @Size(max = 50, message = "tLx长度不能超过{max}位")
    private String tLx;

    @Size(max = 200, message = "body长度不能超过{max}位")
    private String body;

    @Size(max = 200, message = "attach长度不能超过{max}位")
    private String attach;

    private Double servicecharge;

    private Double rate;

    private Integer ordertime;

    @Size(max = 200, message = "wxorgid长度不能超过{max}位")
    private String wxorgid;

    public void freeData() {
        this.bid = null;
        this.paytime = null;
        this.mchid = null;
        this.childmchid = null;
        this.deviceid = null;
        this.wxorderid = null;
        this.orderid = null;
        this.openid = null;
        this.tradeType = null;
        this.resultCode = null;
        this.bankType = null;
        this.feeType = null;
        this.totalFee = null;
        this.enterprisebonusamount = null;
        this.tWxOrderid = null;
        this.tOrderid = null;
        this.tTotalFee = null;
        this.tEnterpriseAmount = null;
        this.tLx = null;
        this.body = null;
        this.attach = null;
        this.servicecharge = null;
        this.rate = null;
        this.ordertime = null;
        this.wxorgid = null;
    }
}
